package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.CommissionStatus;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.YgCommissionModel;
import com.ygqh.baby.po.YgCommission;
import com.ygqh.baby.po.YgCommissionExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface YgCommissionMapper {
	int countByExample(YgCommissionExample example);

	int deleteByExample(YgCommissionExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgCommission record);

	int insertSelective(YgCommission record);

	List<YgCommission> selectByExample(YgCommissionExample example);

	YgCommission selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgCommission record, @Param("example") YgCommissionExample example);

	int updateByExample(@Param("record") YgCommission record, @Param("example") YgCommissionExample example);

	int updateByPrimaryKeySelective(YgCommission record);

	int updateByPrimaryKey(YgCommission record);

	int countSuper(@Param("userName") String userName, @Param("cStatus") CommissionStatus cStatus, @Param("q") String q);

	List<YgCommission> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("userName") String userName, @Param("cStatus") CommissionStatus cStatus,
			@Param("q") String q);

    List<YgCommissionModel> searchModel(@Param("queryInfo")QueryInfo queryInfo, @Param("userId")Long userId,
										@Param("commissionStatus")String[] commissionStatus,
										@Param("platformNo") String platformNo);

	int searchModelCount(@Param("userId") Long userId, @Param("commissionStatus")String[] commissionStatus,
						 @Param("platformNo") String platformNo);

    YgCommissionModel findModelById(@Param("id") Long id);
}
